package com.lixin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lixin.entity.Friendships;
import com.lixin.entity.Users;
import com.lixin.model.response.FindAllFriendsResponse;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 用于存储用户之间的好友关系 服务类
 * </p>
 *
 * @author lixin
 * @since 2023-07-28
 */
public interface IFriendshipsService extends IService<Friendships> {

    void addFriend(Integer friendId,Integer userId);


    Friendships addOrUpdate(Friendships friendships);

    Boolean isFriend(Integer friendId, Integer userId);

    Friendships findFriendByFriendAndUserId(Integer friendId, Integer userId);

    Friendships selectById(Integer friendshipsId);

    Friendships builder(Date date, Integer userId, Integer friendId);

    Integer deleteFriend(Integer friendId,Integer userId);

    List<Users> findAllFriends(Integer userId);

    List<Friendships> findAllFriendsQuery(Integer userId);
}
